package edu.arizona.sista.learn.model.interest;

import java.util.List;

import edu.arizona.sista.learn.model.Interval;
import edu.arizona.sista.learn.model.displaying.DisplayingSomething;
import edu.arizona.sista.learn.model.holding.Person;
import edu.arizona.sista.learn.model.holding.Scene;
import edu.arizona.sista.learn.model.inferences.Predicate;

public class Interest {

	public static void getNotInterestedPeople(Scene scene) {
		List<DisplayingSomething> displayingSomethingEvents = scene.getDisplayingSomethingEvents();
		List<WalkingBackwards> walkingBackwardsEvents = scene.getWalkingBackwardsEvents();
		
		for(DisplayingSomething ds : displayingSomethingEvents){
			List<Person> people = ds.getRecipientsOfInfo();
			for (Person p : people){
				for (WalkingBackwards wb : walkingBackwardsEvents){
					if (wb._doer.equals(p)){
						//p is walking backwards and is the recipient info of the displaying event
						//do both events temporally subsume?
						if (ds._time.temporallySubsumes(wb._time, Interval.NOISE_WINDOW)){
							scene.addPredicate(new Predicate("interests(" + p.getVariableName() + ", " + ds._object.getVariableName() + ", veryLowToLowAmountOf)"));
						}
					}
				}
			}
		}
		
	}

}
